﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Text;
using DTcms.Common;

namespace DTcms.Web
{
    public partial class News : System.Web.UI.Page
    {
        protected DataTable dtMenu = null;
        protected string connnt = "";
        protected string id = "";
        protected void Page_Load(object sender, EventArgs e)
        {

            int _id = DTRequest.GetQueryInt("id");
            id = _id.ToString();
            rptTeam.DataSource = new BLL.article_category().GetList(69, 4);
            rptTeam.DataBind();

            if (_id != 0)
            {
                Model.article_category model = new BLL.article_category().GetModel(_id);
                Model.article_category modelP = new BLL.article_category().GetModel(model.parent_id);
                StringBuilder html = new StringBuilder();
                html.Append("<a href=\"/index.aspx\">主页</a>");
                if (modelP != null)
                {
                    html.Append("> <a href=\"" + modelP.link_url + "\">" + modelP.title + "</a>");
                }
                if (model != null)
                {
                    html.Append("> <a href=\"" + model.link_url + "?id=" + model.id + "\">" + model.title + "</a>");
                }
                memu.InnerHtml = html.ToString();
            }

            Repeater1.DataSource = new BLL.article().GetList(18,"channel_id=4 and category_id=" + _id,"sort_id,add_time desc");
            Repeater1.DataBind();
        }
    }
}